package com.threefish.modules.sys.entity.organize;

import com.threefish.common.entity.AbstractBaseEntity;
import org.nutz.dao.entity.annotation.*;
import org.nutz.plugins.validation.annotation.Validations;

import java.io.Serializable;

/**
 * @author 黄川 306955302@qq.com
 * @date: 2018/6/1
 * 描述此类：
 */
@Table("sys_job")
@Comment("岗位信息")
public class Job extends AbstractBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Name
    @Prev(els = @EL("$me.uuid()"))
    @ColDefine(width = 32, notNull = true)
    @Comment("主键")
    @Column("id")
    private String id;

    @Column
    @Comment("岗位编号")
    @ColDefine(width = 32, notNull = true)
    @Validations(required = true, errorMsg = "请填写岗位编号")
    private String code;

    @Column
    @Comment("岗位名称")
    @ColDefine(width = 50, notNull = true)
    @Validations(required = true, strLen = {2, 50}, errorMsg = "请填写岗位名称")
    private String name;

    @Column
    @Comment("岗位性质")
    @ColDefine(width = 3, notNull = true)
    @Validations(el = "value>0", errorMsg = "请选择岗位性质")
    private int nature;

    @Column
    @Comment("岗位分类")
    @ColDefine(width = 3, notNull = true)
    @Validations(el = "value>0", errorMsg = "请选择岗位分类")
    private int category;

    @Column
    @Comment("是否加入统计")
    @Default("1")
    @Validations(required = true, el = "value==0||value==1", errorMsg = "请选择是否加入统计")
    private int isStatistics;

    @Column
    @Comment("分配部门")
    @ColDefine(width = 5000)
    private String deptsDesc;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNature() {
        return nature;
    }

    public void setNature(int nature) {
        this.nature = nature;
    }

    public int getCategory() {
        return category;
    }

    public void setCategory(int category) {
        this.category = category;
    }

    public String getDeptsDesc() {
        return deptsDesc;
    }

    public void setDeptsDesc(String deptsDesc) {
        this.deptsDesc = deptsDesc;
    }

    public int getIsStatistics() {
        return isStatistics;
    }

    public void setIsStatistics(int isStatistics) {
        this.isStatistics = isStatistics;
    }
}
